package com.kafka.blogvue.util;

import com.kafka.blogvue.shiro.AccountProfile;

import org.apache.shiro.SecurityUtils;

/**
 * shiro工具类
 */
public class ShiroUtil {

    /**
     * 获取到当前用户
     * @return
     */
    public static AccountProfile getProfile(){
        AccountProfile accountProfile =  (AccountProfile) SecurityUtils.getSubject().getPrincipal();

        return accountProfile;
    }

}
